package com.hejjon.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hejjon.core.domain.entity.BusinessAttr;
import com.hejjon.domain.vo.BusiAttrTreeNodeVO;
import com.hejjon.domain.vo.BusinessAttrVO;

import java.util.List;

/**
 * @author: cs
 * @date: 2025-04-17 14:36:35
 * @since: 1.0
 */
public interface IBusinessAttrService extends IService<BusinessAttr> {

    /**
     * 新增业务属性
     * @param ba
     * @return
     */
    boolean create(BusinessAttr ba);

    boolean update(BusinessAttr ba);

    /**
     * @param categoryId
     * @return
     */
    List<BusinessAttrVO> listByCategoryId(String categoryId);

    /**
     * 根据分类ID判断是否存在业务属性
     * @param categoryId  分类ID
     * @return
     */
    boolean exitByCategoryId(String categoryId);


    /**
     * 查询业务属性树结构数据
     * @return
     */
    List<BusiAttrTreeNodeVO> listTree(String featureId);

    /**
     *
     * @param categoryIdList
     * @return
     */
    List<BusinessAttrVO> listByCategoryIds(List<String> categoryIdList);


    /**
     * 批量删除 逻辑删除 delete_flag 设置为1
     */
    boolean removeByIds(List<String> ids, String deleteFlag);


}
